package cn.easybuy.dao;

import cn.easybuy.entity.PageInfo;
import cn.easybuy.entity.Product;
import cn.easybuy.entity.ProductCategory;

import java.sql.SQLException;
import java.util.List;

import cn.easybuy.entity.Product;

import java.sql.SQLException;

public interface ProductDAO {

    PageInfo<Product> proListAll(PageInfo<Product> pageInfo) throws SQLException;

    PageInfo<ProductCategory> getCategoryList(PageInfo<ProductCategory> page) throws SQLException;

    int categoryAdd(int cate1,int cate2, String name) throws SQLException;

    List<ProductCategory> getCate1(int pid,int type) throws SQLException;

    int categoryDel(int id) throws SQLException;

    int productAdd(Product product) throws SQLException;

    Product getProductById(int id) throws SQLException;

    int productUpd(Product product) throws SQLException;

    int productDel(int id) throws SQLException;

     List<ProductCategory> getALlCate(ProductCategory category) throws SQLException;

     List<Product> getProDuctList(int cateId) throws SQLException;

    //根据id查询商品详情
     Product getProById(int id)throws SQLException;

    List<Product> getProListCate2(int id,int type) throws SQLException;
}